<!--
  文件描述：流程图-循环嵌套绘制
  nodeType： 0、发起人 1、审批节点 2、条件 3、具体条件
-->
<template>
  <div class="">
    <!-- 节点  -->
    <node-page v-if="['0', '1'].includes(processData.nodeType)" :process-data="processData"
      :disabled="disabled"></node-page>
    <!--  条件  -->
    <condition-page v-if="['2'].includes(processData.nodeType)" :process-data="processData"
      :disabled="disabled"></condition-page>
    <!--  条件  -->
    <template v-if="processData.childNode">
      <!--  嵌套组件本身  -->
      <process-page-item :processData="processData.childNode" :disabled="disabled"></process-page-item>
    </template>
  </div>
</template>
<script setup name="processPageItem">
import nodePage from '@/view/workflow/config/components/node-page.vue'
import conditionPage from '@/view/workflow/config/components/condition-page.vue'
const props = defineProps({
  processData: {
    type: Object,
    default: {}
  },
  disabled: {
    type: Boolean,
    default: false
  }
})

</script>
<style scoped lang="less">
@import '@/view/workflow/config/components/index.less';
</style>